Learn how to optimize your InstantSearch web app.
React InstantSearch versions
head
of your page.
showLoadingIndicator
option.Change the duration of the delay with stalledSearchDelay
(on the instantSearch
widget).For example:Loading...
when search stalls.
If network conditions are optimal, users won’t see this message.searchBox
level with the queryHook
option.
For example:queryHook
and is called on every keystroke.
In the example, the code debounces the call to refine
.When network speeds improve, you should restore search-as-you-type to offer users the best possible experience.
You can use the Network Information API to detect connection changes.React InstantSearch SSR
sideEffects
property in package.json
, such as Rollup or webpack 4+.module
field in package.json
(resolve.mainFields
option in webpack, mainFields
option in @rollup/plugin-node-resolve
). This is the default configuration in most popular bundlers: you only need to change something if you have a custom configuration.babel-preset-env
not to process ES6 modules:Minimize imports with InstantSearch.js and Vue InstantSearch
Caching with InstantSearch.js and Vue InstantSearch
refresh()
method on the instantsearch
instance lets you clear the cache and trigger a new search.waitTask
to avoid refreshing the cache too early.